<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Zeo's Security Lab - Zeo Security Lab</title><meta name="author" content="Zeo"><meta name="copyright" content="Zeo"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="ffffff"><meta name="description" content="专注于安全,分享生活,分享知识">
<meta property="og:type" content="website">
<meta property="og:title" content="Zeo&#39;s Security Lab">
<meta property="og:url" content="https://godzeo.github.io/page/5/index.html">
<meta property="og:site_name" content="Zeo&#39;s Security Lab">
<meta property="og:description" content="专注于安全,分享生活,分享知识">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png">
<meta property="article:author" content="Zeo">
<meta property="article:tag" content="WEB安全">
<meta property="article:tag" content="代码审计">
<meta property="article:tag" content="内网">
<meta property="article:tag" content="渗透">
<meta property="article:tag" content="二进制">
<meta property="article:tag" content="CTF">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png"><link rel="shortcut icon" href="/img/WX20211124-162855.png"><link rel="canonical" href="https://godzeo.github.io/page/5/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Zeo\'s Security Lab',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2022-11-28 20:43:30'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', 'ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="Zeo's Security Lab" type="application/atom+xml">
</head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">125</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">46</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231216806.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Zeo's Security Lab</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Zeo's Security Lab</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/godzeo" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:zzzhhhaaaiiii@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2020/12/31/webshell%E5%A4%9A%E7%A7%8D%E6%96%B9%E6%B3%95%E5%85%8D%E6%9D%80/" title="webshell多种方法免杀"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225569.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="webshell多种方法免杀"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/12/31/webshell%E5%A4%9A%E7%A7%8D%E6%96%B9%E6%B3%95%E5%85%8D%E6%9D%80/" title="webshell多种方法免杀">webshell多种方法免杀</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-12-31T05:39:23.000Z" title="发表于 2020-12-31 13:39:23">2020-12-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/WEB-%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0%E5%92%8C%E5%88%86%E6%9E%90/">WEB 漏洞复现和分析</a></span></div><div class="content">

0x00 前提
 -2020 最后一天了，这个月其实没有完整的写完东西，这是以前的存货了，应为生病了，真的的难受的不行，什么也干不了，天天站不行坐不行，躺着也不行了。。。哎。。。总之身体真的很重要，别搞坏了身体！！！
webshell这个东西对于web方向的还是极其重要的，getshell被杀了很难受，于是来研究一波自己的免杀马儿，毕竟别人没有自己的好用，而且分享出来分分钟被杀。
在本篇文章中将会介绍一些常用的木马免杀技巧

0x01 检测情况
WAF一般都是维护一个规则库，记录webshell常用的函数、方法等等，通过这个规则库匹配从而检测是否是木马。
当匹配上对应特征时就是告警，但是规则匹配肯定会有误报，waf一直告警也很烦，所以waf一般会稳定为首要目标，也会放宽一下规则，这就是绕的基础

查杀软件我首先：D盾
『D盾_防火墙』专为IIS设计的一个主动防御的保护软件,以内外保护的方式 防止网站和服务器给入侵,在正常运行各类网站的情 况下，越少的功能，服务器越安全的理念而设计！ 限制了常见的入侵方法，让服务器更安全!
0x02 PHP一句话这次主要是对php的一句话免杀实验
首 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2020/11/23/WordPress%20xmlrpc.php%20SSRF%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/" title="WordPress xmlrpc.php SSRF漏洞复现"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225559.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="WordPress xmlrpc.php SSRF漏洞复现"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/11/23/WordPress%20xmlrpc.php%20SSRF%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/" title="WordPress xmlrpc.php SSRF漏洞复现">WordPress xmlrpc.php SSRF漏洞复现</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-11-23T03:51:26.000Z" title="发表于 2020-11-23 11:51:26">2020-11-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/WEB-%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0%E5%92%8C%E5%88%86%E6%9E%90/">WEB 漏洞复现和分析</a></span></div><div class="content">

0x01 WordPress xmlrpc.php 存在SSRF漏洞通过Pingback可以实现的服务器端请求伪造 (Server-side request forgery，SSRF)和远程端口扫描。
0x02 影响版本WordPress 版本&lt; 3.5.1
造成的影响1、可以对业务内网进行探测。2、攻击运行在内网或本地的应用程序（比如溢出攻击）。3、利用file协议读取本地文件等
0x03漏洞验证第一步：直接访问这个文件，初步判断

第二步：发现POC验证数据包
需要修改三处地方：例如：www.baidu.com
123Host: www.baidu.com&lt;param&gt;&lt;value&gt;&lt;string&gt;DNSLOG地址&lt;/string&gt;&lt;/value&gt;&lt;/param&gt;&lt;param&gt;&lt;value&gt;&lt;string&gt;http://www.baidu.com/?p=1&lt;/string&gt;&lt;/value&gt;&lt;/param&gt;

完整验证数据包
123 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2020/11/02/Weblogic%EF%BC%88CVE-2020-14882%EF%BC%8CCVE-2020-14883%EF%BC%89%20%E7%AE%A1%E7%90%86%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%9C%AA%E6%8E%88%E6%9D%83%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E/" title="Weblogic（CVE-2020-14882，CVE-2020-14883） 管理控制台未授权远程命令执行漏洞"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Weblogic（CVE-2020-14882，CVE-2020-14883） 管理控制台未授权远程命令执行漏洞"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/11/02/Weblogic%EF%BC%88CVE-2020-14882%EF%BC%8CCVE-2020-14883%EF%BC%89%20%E7%AE%A1%E7%90%86%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%9C%AA%E6%8E%88%E6%9D%83%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E/" title="Weblogic（CVE-2020-14882，CVE-2020-14883） 管理控制台未授权远程命令执行漏洞">Weblogic（CVE-2020-14882，CVE-2020-14883） 管理控制台未授权远程命令执行漏洞</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-11-02T03:37:14.000Z" title="发表于 2020-11-02 11:37:14">2020-11-02</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/WEB-%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0%E5%92%8C%E5%88%86%E6%9E%90/">WEB 漏洞复现和分析</a></span></div><div class="content">

Weblogic（CVE-2020-14882，CVE-2020-14883） 管理控制台未授权远程命令执行漏洞0x01 漏洞简述2020年10月29日，360CERT监测发现 Weblogic ConSole HTTP 协议代码执行漏洞,该漏洞编号为 CVE-2020-14882,CVE-2020-14883 ，漏洞等级：严重，漏洞评分：9.8。
远程攻击者可以构造特殊的HTTP请求，在未经身份验证的情况下接管 WebLogic Server Console，并在 WebLogic Server Console 执行任意代码。
0x02 影响版本Oracle:Weblogic:

10.3.6.0.0
12.1.3.0.0
12.2.1.3.0
12.2.1.4.0
14.1.1.0.0

0x03 漏洞详情CVE-2020-14883: 权限绕过漏洞远程攻击者可以构造特殊的HTTP请求，在未经身份验证的情况下接管 WebLogic Server Console。
权限绕过漏洞（CVE-2020-14882），访问以下URL，未授权访问到管理后台页面（低权限的用户）：
1http ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2020/10/13/CS%E9%80%9A%E8%BF%87(CDN+%E8%AF%81%E4%B9%A6)powershell%E4%B8%8A%E7%BA%BF%E8%AF%A6%E7%BB%86%E7%89%88/" title="CS通过(CDN+证书)powershell上线详细版"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225559.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="CS通过(CDN+证书)powershell上线详细版"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/10/13/CS%E9%80%9A%E8%BF%87(CDN+%E8%AF%81%E4%B9%A6)powershell%E4%B8%8A%E7%BA%BF%E8%AF%A6%E7%BB%86%E7%89%88/" title="CS通过(CDN+证书)powershell上线详细版">CS通过(CDN+证书)powershell上线详细版</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-10-13T10:31:46.000Z" title="发表于 2020-10-13 18:31:46">2020-10-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%86%85%E7%BD%91%E5%AE%89%E5%85%A8%E7%A0%94%E7%A9%B6/">内网安全研究</a></span></div><div class="content">

0x00 简介这个应该叫做域前置技术：
大致图示：


攻击流量通过CDN节点将流量转发到真实的C2服务器
CDN节点ip通过识别请求的Host头进行流量转
可以有效的躲避一些安全设备，也有这一定的反溯源功能，因为流量都去了CDN上

之前看了一些文章，但是大佬有些地方觉得简单肯能就没写，自己搭建的时候就写了一些，算是我的一个笔记吧，感觉较为详细了，比较适合新手。
0x01 需要资源
cobaltstrike 4.0
VPS（cs服务器）
域名
CDN
国外代理

0x02 域名免费申请申请地址：https://www.freenom.com/
重点是免费且不用备案的

自行选择申请免费的域名

注意：要挂代理，然后把个人信息的地址设置成代理的地址，要不可能申请不成功

0x03 免费CDN准备申请地址：https://dash.cloudflare.com/
自行注册并登录设置CDN

0x04 域名和CDN联动设置登陆CDN,添加站点为刚刚申请的域名

添加A记录，指向VPS的IP地址
1234类型	名称	 内容	           TTL	代理状态	A    test 10 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2020/09/09/PHP%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E5%8F%98%E9%87%8F%E8%A6%86%E7%9B%96/" title="PHP代码审计：变量覆盖"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225569.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="PHP代码审计：变量覆盖"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/09/09/PHP%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E5%8F%98%E9%87%8F%E8%A6%86%E7%9B%96/" title="PHP代码审计：变量覆盖">PHP代码审计：变量覆盖</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-09-09T07:56:43.000Z" title="发表于 2020-09-09 15:56:43">2020-09-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x00 前提本文是给作为给小伙伴分享教学的一篇文章，给讲一下，所以写的比较简陋。。。见谅而且都比较基础，只是简单讲课提纲吧
0x01 变量覆盖审计0x00 简介变量覆盖，顾名思义就是可以覆盖已有变量值，导致变量覆盖的漏洞
常见的造成的代码审计的情景是代码中出现以下关键词：
register_globals&#x3D;on
extract()函数
parse_str()函数
import_request_variables()函数
$$

0x01 变量覆盖演示extract()extract(array,extract_rules,prefix)函数
https://www.runoob.com/php/func-array-extract.html
该函数可以从数组中将变量导入到当前的符号表，即将数组中的键值对注册成函数，使用数组键名作为变量名，使用数组键值作为变量值。
这里我们要注意一下该函数的第二个参数

EXTR_OVERWRITE - 默认。如果有冲突，则覆盖已有的变量。
EXTR_SKIP - 如果有冲突，不覆盖已有的变量。

这就为我们提供了覆盖的可能。
12345 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2020/09/03/Shiro%20550%20%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%20%E8%AF%A6%E7%BB%86%E5%88%86%E6%9E%90+poc%E7%BC%96%E5%86%99/" title="Shiro 550 反序列化漏洞 详细分析+poc编写"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225569.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Shiro 550 反序列化漏洞 详细分析+poc编写"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/09/03/Shiro%20550%20%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%20%E8%AF%A6%E7%BB%86%E5%88%86%E6%9E%90+poc%E7%BC%96%E5%86%99/" title="Shiro 550 反序列化漏洞 详细分析+poc编写">Shiro 550 反序列化漏洞 详细分析+poc编写</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-09-03T10:51:50.000Z" title="发表于 2020-09-03 18:51:50">2020-09-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x00 前言shiro反序列化漏洞这个从 shiro 550 开始，在2016年就爆出来, 但是到现在在各种攻防演练中也起到了显著作用
这个漏洞一直都很好用，特别是一些红蓝对抗HW的下边界突破很好用
遂研究一下这个漏洞的成因和分析一下代码
0x01 Shiro 550 漏洞描述Apache Shiro RememberMe 反序列化导致的命令执行漏洞
Apache Shiro是一个强大且易用的Java安全框架,执行身份验证、授权、密码和会话管理
编号：Shiro-550, CVE-2016-4437
版本：Apache Shiro (由于密钥泄露的问题, 部分高于1.2.4版本的Shiro也会受到影响)
0x02 环境搭建基础环境编辑器：IDEA 2020
java版本：jdk1.7.0_80
Server版本 : Tomcat 8.5.56
shiro版本：shiro-root-1.2.4
组件：commons-collections4
搭建过程如果闲配置麻烦，也可以直接用我弄好的GitHub地址
https://github.com/godzeo/shiro\_1.2.4\_ ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2020/08/27/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E9%93%BECommonsCollections1%E8%AF%A6%E8%A7%A3/" title="Java代码审计：反序列化链CommonsCollections1详解"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计：反序列化链CommonsCollections1详解"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/27/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E9%93%BECommonsCollections1%E8%AF%A6%E8%A7%A3/" title="Java代码审计：反序列化链CommonsCollections1详解">Java代码审计：反序列化链CommonsCollections1详解</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-27T14:13:05.000Z" title="发表于 2020-08-27 22:13:05">2020-08-27</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x01 漏洞介绍Apache Commons Collections是一个第三方的基础类库，提供了很多强有力的数据结构类型并且实现了各种集合工具类，可以说是apache开源项目的重要组件。
CommonsCollection在java反序列化的源流中已经存在5年
今天介绍的CommonsCollections1，反序列化的第一种RCE序列化链
CommonsCollections1反序列化漏洞点仍然是commons-collections-3.1版本
0x02 实验环境
maven的pom导入依赖

1234567&lt;dependencies&gt;        &lt;dependency&gt;            &lt;groupId&gt;commons-collections&lt;/groupId&gt;            &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;            &lt;version&gt;3.1&lt;/version&gt;        &lt;/de ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9AJava%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%85%A5%E9%97%A8%E4%B9%8BURLDNS%E9%93%BE/" title="Java代码审计：Java反序列化入门之URLDNS链"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计：Java反序列化入门之URLDNS链"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9AJava%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%85%A5%E9%97%A8%E4%B9%8BURLDNS%E9%93%BE/" title="Java代码审计：Java反序列化入门之URLDNS链">Java代码审计：Java反序列化入门之URLDNS链</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-19T10:50:04.000Z" title="发表于 2020-08-19 18:50:04">2020-08-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x00 前言自学Java 代码审计，主要自己一个人学习，有点闭门造车，搜索引擎学习法，但是还是记录一下，也分享一下，也便于将来的总结和反思，如果我能终能学到什么，我也会重新梳理思路，为那些自学者提供一个好的思路，所以有了下面的系列文章java代码审计自学篇。
之前研究了，但是没有整理好，因为有hvv任务，所以推迟了一些，现在赶紧整理发出来。
0x01 Java反序列化介绍Java反序列化漏洞的产生原因：
简单的说就是，在于开发者在重写 readObject 方法的时候，写入了漏洞代码。
序列化和反序列化本身并不存在问题
但当输入的反序列化的数据可被用户控制，那么攻击者即可通过构造恶意输入，让反序列化产生非预期的对象，在此过程中执行构造的任意代码。
0x02 反序列化方法的对比在接触Java反序列化之前，就是PHP了，PHP的反序列化和着还是有区别的

他们最基本的原理是类似的，反复横跳，找到一个利用链。

都是用于数据存储的一个格式化的操作。

将一个对象中的属性按照某种特定的格式生成一段数据流，在反序列化的时候再按照这个格式将属性拿回来，还原成对象。

而Java其提供了更加高 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9AXXE%E6%BC%8F%E6%B4%9E/" title="Java代码审计：XXE漏洞"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计：XXE漏洞"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9AXXE%E6%BC%8F%E6%B4%9E/" title="Java代码审计：XXE漏洞">Java代码审计：XXE漏洞</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-19T10:20:08.000Z" title="发表于 2020-08-19 18:20:08">2020-08-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x00 前提Java 代码审计自学：主要自己一个人学习，有点闭门造车，搜索引擎学习法，但是还是记录一下，也分享一下，也便于将来的总结和反思，如果我能终能学到什么，我也会重新梳理思路，为那些自学者提供一个好的思路，所以有了下面的系列文章java代码审计自学篇。
0x01 XXE漏洞简介XXE（XML外部实体注入，XML External Entity) ，在应用程序解析XML输入时，当允许引用外部实体时，可构造恶意内容，导致读取任意文件、探测内网端口、攻击内网网站、发起DoS拒绝服务攻击、执行系统命令等。Java中的XXE支持sun.net.www.protocol 里的所有协议：http，https，file，ftp，mailto，jar，netdoc。一般利用file协议读取文件，利用http协议探测内网，没有回显时可组合利用file协议和ftp协议来读取文件。
0x02 XXE相关基础概念XML&amp;DTDXML （可扩展标记语言，EXtensible Markup Language），是一种标记语言，用来传输和存储数据，而非显示数据。DTD（文档类型定义，Documen ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E6%96%87%E4%BB%B6%E7%AF%87!%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0!%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96!%E7%9B%AE%E5%BD%95%E9%81%8D%E5%8E%86/" title="Java代码审计：文件篇/文件上传/文件读取/目录遍历"><img class="post_bg" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225559.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计：文件篇/文件上传/文件读取/目录遍历"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/19/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%E6%96%87%E4%BB%B6%E7%AF%87!%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0!%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96!%E7%9B%AE%E5%BD%95%E9%81%8D%E5%8E%86/" title="Java代码审计：文件篇/文件上传/文件读取/目录遍历">Java代码审计：文件篇/文件上传/文件读取/目录遍历</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-19T08:46:04.000Z" title="发表于 2020-08-19 16:46:04">2020-08-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/">代码审计</a></span></div><div class="content">

0x00 前提自学Java 代码审计，主要自己一个人学习，有点闭门造车，搜索引擎学习法，但是还是记录一下，也分享一下，也便于将来的总结和反思，如果我能终能学到什么，我也会重新梳理思路，为那些自学者提供一个好的思路，所以有了下面的系列文章java代码审计自学篇。
0x01 文件路径穿越简述：
许多的文件漏洞都是来源于文件路径的问题，好多时候也是路径可控，再加上一下程序员奇怪的逻辑。
如果漏洞路径可控提供很多其他突破的方法
攻击者利用../可以上传至任意指定目录或者目录穿越。

示例代码：中间有../可以造成文件路径的不安全
12345678910111213package file;import java.io.File;import java.io.IOException;public class filepath &#123;    public static void main(String[] args) throws IOException &#123;        File file = new File(&quot;../../file/123.txt&quot;); ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/4/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/4/#content-inner">4</a><span class="page-number current">5</span><a class="page-number" href="/page/6/#content-inner">6</a><span class="space">&hellip;</span><a class="page-number" href="/page/13/#content-inner">13</a><a class="extend next" rel="next" href="/page/6/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Zeo</div><div class="author-info__description">专注于安全,分享生活,分享知识</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">125</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">46</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/godzeo"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/godzeo" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:zzzhhhaaaiiii@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">Weclome my blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/11/28/Nosql%20inject%E6%B3%A8%E5%85%A5/" title="Nosql inject注入"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nosql inject注入"/></a><div class="content"><a class="title" href="/2022/11/28/Nosql%20inject%E6%B3%A8%E5%85%A5/" title="Nosql inject注入">Nosql inject注入</a><time datetime="2022-11-28T07:28:02.000Z" title="发表于 2022-11-28 15:28:02">2022-11-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/15/%E4%BC%81%E4%B8%9A%20SDLC%20%E5%AE%89%E5%85%A8%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%AE%A1%E7%90%86/" title="企业 SDLC 安全生命周期管理"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="企业 SDLC 安全生命周期管理"/></a><div class="content"><a class="title" href="/2022/11/15/%E4%BC%81%E4%B8%9A%20SDLC%20%E5%AE%89%E5%85%A8%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%AE%A1%E7%90%86/" title="企业 SDLC 安全生命周期管理">企业 SDLC 安全生命周期管理</a><time datetime="2022-11-15T14:03:44.000Z" title="发表于 2022-11-15 22:03:44">2022-11-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/05/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E6%BC%8F%E6%B4%9E(File%20Operation!Redirect!Cors)/" title="Go 代码审计漏洞(File Operation\Redirect\Cors)"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Go 代码审计漏洞(File Operation\Redirect\Cors)"/></a><div class="content"><a class="title" href="/2022/11/05/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E6%BC%8F%E6%B4%9E(File%20Operation!Redirect!Cors)/" title="Go 代码审计漏洞(File Operation\Redirect\Cors)">Go 代码审计漏洞(File Operation\Redirect\Cors)</a><time datetime="2022-11-05T09:15:28.000Z" title="发表于 2022-11-05 17:15:28">2022-11-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/10/30/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E9%AB%98%E5%8D%B1%E6%BC%8F%E6%B4%9E(sqli!cmd!ssrf)/" title="Go 代码审计高危漏洞(sqli\cmd\ssrf)"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Go 代码审计高危漏洞(sqli\cmd\ssrf)"/></a><div class="content"><a class="title" href="/2022/10/30/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E9%AB%98%E5%8D%B1%E6%BC%8F%E6%B4%9E(sqli!cmd!ssrf)/" title="Go 代码审计高危漏洞(sqli\cmd\ssrf)">Go 代码审计高危漏洞(sqli\cmd\ssrf)</a><time datetime="2022-10-30T06:57:14.000Z" title="发表于 2022-10-30 14:57:14">2022-10-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/05/10/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%20ClassLoader%E5%BA%94%E7%94%A8/" title="Java代码审计： ClassLoader应用"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计： ClassLoader应用"/></a><div class="content"><a class="title" href="/2022/05/10/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%20ClassLoader%E5%BA%94%E7%94%A8/" title="Java代码审计： ClassLoader应用">Java代码审计： ClassLoader应用</a><time datetime="2022-05-10T08:21:21.000Z" title="发表于 2022-05-10 16:21:21">2022-05-10</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/WEB-%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0%E5%92%8C%E5%88%86%E6%9E%90/"><span class="card-category-list-name">WEB 漏洞复现和分析</span><span class="card-category-list-count">48</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/app%E6%B8%97%E9%80%8F/"><span class="card-category-list-name">app渗透</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/spring-boot/"><span class="card-category-list-name">spring boot</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%AE%89%E5%85%A8%E7%A0%94%E7%A9%B6/"><span class="card-category-list-name">二进制安全研究</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E4%B8%8E%E5%AE%89%E5%85%A8%E7%A0%94%E7%A9%B6%E9%83%A8/"><span class="card-category-list-name">人工智能机器学习与安全研究部</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/"><span class="card-category-list-name">代码审计</span><span class="card-category-list-count">23</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%86%85%E7%BD%91%E5%AE%89%E5%85%A8%E7%A0%94%E7%A9%B6/"><span class="card-category-list-name">内网安全研究</span><span class="card-category-list-count">19</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%AE%89%E5%85%A8%E5%BC%80%E5%8F%91/"><span class="card-category-list-name">安全开发</span><span class="card-category-list-count">11</span></a></li>
            </ul></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/11/"><span class="card-archive-list-date">十一月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/10/"><span class="card-archive-list-date">十月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/04/"><span class="card-archive-list-date">四月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/03/"><span class="card-archive-list-date">三月 2022</span><span class="card-archive-list-count">5</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/01/"><span class="card-archive-list-date">一月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/12/"><span class="card-archive-list-date">十二月 2021</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">125</div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-11-28T12:43:29.635Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2022 By Zeo</div><div class="footer_custom_text">Hi, welcome to my blog!</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><div class="js-pjax"><script>function subtitleType () {
  if (true) { 
    window.typed = new Typed("#subtitle", {
      strings: ["Life is like a box of chocolates that you will never know what you gonna get"],
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = 'Life is like a box of chocolates that you will never know what you gonna get'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script></div></div></body></html>